home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 51 / Amiga Format CD51 (2000-03-10)(Future Publishing)(GB)[!][issue 2000-04].iso / -in_the_mag- / pdselect / awnp / awnp-docs / guitips.doc < prev    next >
Text File  |  2000-02-16  |  2KB  |  43 lines

  1.  A few quick hints about building and debugging AWNP applications.
  2.  
  3. Before writing an AWNP GUI application prototype the GUI with a simple text file (mygui). Use
  4. 'copy mygui awnpipe:pipename/xcwcon:'
  5.  
  6. This speeds up testing of layout changes! Also note you can comment out lines in your file by starting them with ';'. Any line with a semicolon in the first position is ignored.
  7.  
  8. --
  9.  
  10.  NAME YOUR PIPES !
  11.  
  12.  Rather than opening 'awnpipe:/xc' provide a unique name. Use 'awnpipe:PipeName/xc'.
  13.  
  14.  A common problem when developing an AWNP application is to find the pipe conversation hangs. Usually this means your program is trying to read data from the pipe, and the pipe is trying to read data from your application. (a read is pending on both ends of the pipe).
  15.  
  16.  This can be cleared by issuing a simple shell command.
  17.  
  18. 'echo >awnpipe:PipeName/a'
  19.  
  20.  Both reads are aborted and AWNP usually notices a problem and exits cleanly.
  21.  
  22. --
  23.  
  24.  Some times it will be useful to trace the conversation your program has with AWNP. Again this can be done with a simple shell command.
  25.  
  26. 'type awnpipe:PipeName/t/i'
  27.  
  28.  All data passing either way through the pipe will be output. When your program exits the type command will return. ( this is not limited to to GUI applications. It works for ALL awnp connections!)
  29.  
  30.  You can also use
  31.  
  32. 'copy awnpipe:PipeName/t/i mylogfile'
  33.  
  34.  This saves the conversation to the logfile of course.
  35.  
  36.  You can use both at the same time, in fact you can 'twin' the data stream as many times as you like.
  37.  
  38.  Some times durring testing you might create a GUI with no close gadget, you can usualy close ANY GUI with 'control backslash' like you can with a con:.
  39.  
  40. --
  41.  
  42.  In general you can not assume that you can modify all the parameters you can define for objects. Also in some cases the parameter names or usage may be different in the modify command when compared to the definition line.
  43.